package us.mooresr.webtroopmanager.shared;

import com.google.gwt.user.client.rpc.IsSerializable;

public class EventParticipantSummary implements IsSerializable, Comparable<EventParticipantSummary> {
	private Long id;
	private Long eventId;
	private Long personId;
	private Boolean paid;
	private Boolean permissionSlip;
	private String firstName;
	private String lastName;
	
	public EventParticipantSummary() {
		
	}

	public EventParticipantSummary(Long id, Long eventId, Long personId,
			Boolean paid, Boolean permissionSlip, String firstName,
			String lastName) {
		super();
		this.id = id;
		this.eventId = eventId;
		this.personId = personId;
		this.paid = paid;
		this.permissionSlip = permissionSlip;
		this.firstName = firstName;
		this.lastName = lastName;
	}

	
	
	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Long getEventId() {
		return eventId;
	}

	public void setEventId(Long eventId) {
		this.eventId = eventId;
	}

	public Long getPersonId() {
		return personId;
	}

	public void setPersonId(Long personId) {
		this.personId = personId;
	}

	public Boolean getPaid() {
		return paid;
	}

	public void setPaid(Boolean paid) {
		this.paid = paid;
	}

	public Boolean getPermissionSlip() {
		return permissionSlip;
	}

	public void setPermissionSlip(Boolean permissionSlip) {
		this.permissionSlip = permissionSlip;
	}

	public String getFirstName() {
		return firstName;
	}

	public void setFirstName(String firstName) {
		this.firstName = firstName;
	}

	public String getLastName() {
		return lastName;
	}

	public void setLastName(String lastName) {
		this.lastName = lastName;
	}

	public String getDisplayName() {
		return firstName + " " + lastName;
	}

	@Override
	public int compareTo(EventParticipantSummary arg0) {
		String thisValue = this.lastName + this.firstName;
		String otherValue = arg0.lastName + arg0.firstName;
		return thisValue.compareTo(otherValue);
	}

}
